<extend name="Public:innerbase" />
<block name="css">
<link rel="stylesheet" href="{:STATICS}/validation/css/validationEngine.jquery.css">
</block>
<block name="js">
<script src="{:RES}/js/date/WdatePicker.js"></script>
<script src="{:STATICS}/spark/spark.util.js"></script>
<script type="text/javascript" src="{:STATICS}/validation/js/jquery.validationEngine.js"></script>
<script type="text/javascript" src="{:STATICS}/validation/js/jquery.validationEngine-zh_CN.js"></script>
<script>
$(function(){
	$("#form").validationEngine("attach",{ 
		promptPosition:"bottomRight",
		scroll:true,
		showOneMessage:true
	});
});
</script>
</block>
<block name="content">
<div class="container-fluid">
	<div class="page-header wm-page-header">
		<h4 class="left">会员编辑</h4>
		<a href="{:U('member/index')}" class="btn btn-sm btn-default">
			<span class="glyphicon glyphicon-chevron-left"></span>&nbsp;返回
		</a>
	</div>
	<ul class="nav nav-tabs wm-tabs">
		<li><a href="{:U('Member/detail',['id'=>$_GET['id']])}">会员信息</a></li>
		<li class="active"><a href="javascript:void(0)">充值记录</a></li>
		<!-- <li ><a href="{:U('Member/score',['id'=>$_GET['id']])}">积分记录</a></li>
		<li><a href="{:U('Member/expense',['id'=>$_GET['id']])}">商品购买记录</a></li> -->
	</ul>
	<button style="margin:20px 0;" class="btn btn-success" type="button"  data-toggle="modal" data-target="#dialog"><i class="fa fa-rmb fa-lg"></i>&nbsp;充值</button>
	<TABLE class="table wm-table-bordered table-hover table-striped">
		<THEAD>
		<TR>
			<TH>金额</TH>
			<TH>状态</TH>
			<TH>时间</TH>
		</TR>
		</THEAD>
		<TBODY>
		<volist id="list" name="list">
		<TR>
			<TD>
			<if condition="$list['price'] egt 0">
			<span class="text-success">+{$list.price}</span>
			<else/>
			<span class="text-danger">{$list.price}</span>
			</if>
			</TD>
			<TD><if condition="$list['status'] eq 2">
			<span class="text-success">已完成</span>
			<else/>
			<span class="text-danger">未支付</span>
			</if></TD>
			<TD>{$list.createtime|date='Y-m-d H:i',###}</TD>
		</TR>
		</volist>
	  </TBODY>
	</TABLE>
	<div class="modal fade" id="dialog">
	  <div class="modal-dialog">
		<div class="modal-content">
		  <div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h4 class="modal-title">会员充值</h4>
		  </div>
		  <div class="modal-body">
			<form id="form" class="form" method="post">
				<div class="form-group">
					<label for="money">金额</label>
					<input type="text" value="" name="money" class="validate[required,custom[number]] form-control" id="money" />
					<span class="help-block">充值金额必须大于0</span>
				</div>
				<div class="form-group">
					<label for="remark">说明</label>
					<input type="text" value="" name="remark" class="form-control" id="remark" />
					<span class="help-block">充值说明</span>
				</div>
				<button type="submit" class="btn btn-primary">保存</button>
			</form>
		  </div>
		</div><!-- /.modal-content -->
	  </div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
</div>
</block>